<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Spring3-MiniWeb | addRole</title>

<!-- CSS  -->
<link href="<c:url value="/resources/blueprint/screen.css" />"
	rel="stylesheet" type="text/css" />

<link href="<c:url value="/resources/style.css" />" rel="stylesheet"
	type="text/css" />


<!-- JS Library -->
<script type="text/javascript"
	src="<c:url value="/resources/jquery/1.5/jquery.js" />"></script>

<script type="text/javascript"
	src="<c:url value="/resources/validate/jquery.validate.js" />"></script>

<script type="text/javascript"
	src="<c:url value="/resources/validate/messages_cn.js" />"></script>

</head>
<body>

	<c:url var="saveUrl" value="/account/role/save" />

	<div class="container">
		<%@ include file="/common/header.jsp"%>

		<div id="content">
			<div class="span-24 last">

				<form:form id="addRoleForm" modelAttribute="roleAttribute"
					method="post" action="${saveUrl}">
					<table>
						<tr>
							<td><form:label path="name">角色名:</form:label>
							</td>
							<td><form:input path="name" cssClass="required" />
							</td>
						</tr>
					</table>

					<fieldset>
						<legend>权限</legend>

						<c:forEach var="authList" items="${authList }">
							<form:checkbox path="authCheckBox[${authList.id }]"
								value="${authList.id}" label="${authList.name }" />
						</c:forEach>
					</fieldset>

					<input type="submit" value="Save" />
					<input type="button" value="back" onclick="history.back()" />
				</form:form>
			</div>
		</div>
		<%@ include file="/common/footer.jsp"%>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function() {
		
		$("#name").focus();
		$("#addRoleForm").validate();
	});
</script>
</html>